<template>
    <header>
        <div id="logo">
            <a href="/">User's Blog</a>
        </div>
        <nav class="topnav"
             id="topnav">
            <router-link to="./home"><span>首页</span><span class="en">Home</span></router-link>
            <router-link to="./articlelist"><span>文章</span><span class="en">Article</span></router-link>
            <router-link to="./comment"><span>留言版</span><span class="en">Comment</span></router-link>
        </nav>
        </nav>
    </header>
</template>
<style lang="scss">
header {
    width: 1000px;
    margin: auto;
    height: 80px;
    position: relative;
    overflow: hidden
}

#logo a {
    width: 260px;
    height: 60px;
    margin: 10px 0 0 0;
    position: absolute;
    display: block
}

nav {
    float: right;
    width: 100%;
    margin: 30px 0 0 0;
    text-align: right;
    a {
        position: relative;
        display: inline-block;
        font-size: 18px;
        font-family: "微软雅黑", Arial, Helvetica, sans-serif;
        &hover {
            text-decoration: none
        }
    }
}

.topnav a {
    margin: 0 5px;
    padding: 0 8px;
}

.topnav a span:first-child {
    z-index: 2;
    display: block;
}

.topnav a span:last-child {
    z-index: 1;
    display: block;
    color: #999;
    font: 12px Georgia, serif;
    opacity: 0;
    -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
    -moz-transition: -moz-transform 0.3s, opacity 0.3s;
    transition: transform 0.3s, opacity 0.3s;
    -webkit-transform: translateY(-100%);
    -moz-transform: translateY(-100%);
    transform: translateY(-100%);
    text-align: center
}

.topnav a:hover span:last-child,
.topnav a:focus span:last-child {
    opacity: 1;
    -webkit-transform: translateY(0%);
    -moz-transform: translateY(0%);
    transform: translateY(0%);
}

#topnav_current {
    color: #e15782;
}

.en {
    color: #999;
    font-size: 12px;
    z-index: 1;
    display: block;
}
</style>